| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkGraphics::InfiniteBitMask Class Reference

A utility class providing "infinite" masks, formed by bits, or booleans. More...

## Public Member Functions
| InfiniteBitMask ()
| InfiniteBitMask (const InfiniteBitMask &other)
| InfiniteBitMask (InfiniteBitMask &&other)
| ~InfiniteBitMask ()
void | setBit (unsigned int index, bool value)
void | clear ()
bool | getBit (unsigned int index) const
unsigned int | getOrder () const
bool | checkSubPartEquality (const InfiniteBitMask &other, unsigned int begin, unsigned int end) const
std::vector< bool >::reference | operator[] (size_t index)
bool | operator[] (size_t index) const
bool | operator== (const InfiniteBitMask &other) const
bool | operator!= (const InfiniteBitMask &other) const
bool | operator< (const InfiniteBitMask &other) const
InfiniteBitMask & | operator= (const InfiniteBitMask &other)
InfiniteBitMask & | operator= (InfiniteBitMask &&other)

## Detailed Description

A utility class providing "infinite" masks, formed by bits, or booleans.

## Constructor & Destructor Documentation

## ◆ InfiniteBitMask() [1/3]

nkGraphics::InfiniteBitMask::InfiniteBitMask | ( |  | ) |

Default constructor.

## ◆ InfiniteBitMask() [2/3]

nkGraphics::InfiniteBitMask::InfiniteBitMask | ( | const InfiniteBitMask & | other | ) |

Copy constructor.

## ◆ InfiniteBitMask() [3/3]

nkGraphics::InfiniteBitMask::InfiniteBitMask | ( | InfiniteBitMask && | other | ) |

Move constructor.

## ◆ ~InfiniteBitMask()

nkGraphics::InfiniteBitMask::~InfiniteBitMask | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ setBit()

void nkGraphics::InfiniteBitMask::setBit | ( | unsigned int | index,
|  | bool | value
| ) |  |

Sets a bit value, at given index.

Parameters

  index | The index of the bit to set.
  value | The value to attach.

## ◆ clear()

void nkGraphics::InfiniteBitMask::clear | ( |  | ) |

Clears the mask and make it empty again.

## ◆ getBit()

bool nkGraphics::InfiniteBitMask::getBit | ( | unsigned int | index | ) | const

Parameters

  index | The index of the bit value to retrieve.

Returns
  The value of requested bit.

## ◆ getOrder()

unsigned int nkGraphics::InfiniteBitMask::getOrder | ( |  | ) | const

Returns
  The order of the mask, aka the highest index of the bit set to true.

## ◆ checkSubPartEquality()

bool nkGraphics::InfiniteBitMask::checkSubPartEquality | ( | const InfiniteBitMask & | other,
|  | unsigned int | begin,
|  | unsigned int | end
| ) |  | const

Allows to check sub parts for equality between two masks.

Parameters

  other | The mask to check against.
  begin | The first index to check within the masks.
  end | The last index to check.

Returns
  Whether the sub parts are equal (true) or not (false).

## ◆ operator[]() [1/2]

std::vector<bool>::reference nkGraphics::InfiniteBitMask::operator[] | ( | size_t | index | ) |

Access operator.

Parameters

  index | The index of the bit to access.

Returns
  A reference over the value wanted.

## ◆ operator[]() [2/2]

bool nkGraphics::InfiniteBitMask::operator[] | ( | size_t | index | ) | const

Const access operator.

Parameters

  index | The index of the bit to access.

Returns
  The value requested.

## ◆ operator==()

bool nkGraphics::InfiniteBitMask::operator== | ( | const InfiniteBitMask & | other | ) | const

Comparison operator.

Parameters

  other | The mask to compare with.

Returns
  If both masks are equal (true) or not (false).

## ◆ operator!=()

bool nkGraphics::InfiniteBitMask::operator!= | ( | const InfiniteBitMask & | other | ) | const

Comparison operator.

Parameters

  other | The mask to compare with.

Returns
  If both mask are difference (true) or not (false).

## ◆ operator<()

bool nkGraphics::InfiniteBitMask::operator< | ( | const InfiniteBitMask & | other | ) | const

Comparison operator.

Parameters

  other | The mask to compare with.

Returns
  If calling mask is smaller (true) or not (false).

## ◆ operator=() [1/2]

InfiniteBitMask& nkGraphics::InfiniteBitMask::operator= | ( | const InfiniteBitMask & | other | ) |

Assignment operator.

Parameters

  other | The mask to assign.

Returns
  The calling mask, updated.

## ◆ operator=() [2/2]

InfiniteBitMask& nkGraphics::InfiniteBitMask::operator= | ( | InfiniteBitMask && | other | ) |

Assignment operator.

Parameters

  other | The mask to assign.

Returns
  The calling mask, updated.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsGraphics/Utils/InfiniteBitMask.h